<?php
/**
 * Created by PhpStorm.
 * User: zhangbing
 * Date: 2017/5/20
 * Time: 16:16
 */
namespace app\admin\validate;
use think\Validate;
class Group extends validate{
    protected $rule = [
        'title' => 'require|unique:auth_group',
    ];
    protected $message = [
        'title.require' => '角色名不能为空',
        'title.unique'  => '角色名必须唯一',
    ];
    //定义场景
    protected $scene = [
        'groupAdd' => ['title'],
        'groupSave' => ['title'],
    ];
}